import React from 'react'
import {HashRouter} from 'react-router-dom'
import 'antd/dist/antd.less';
import '@/assets/style/laylout.scss'

//todolist
// import TodoList from './views/todoList/Todolist'
// import '@/assets/style/todoList.scss'
//cnode
// import CNode from '@/views/cnode/CNode'

//学习
// import MyContext from '@/views/study/MyContext'
// import TestHoc from '@/views/study/TestHoc'
// import TestHooks from '@/views/study/TestHooks'

//mobx
import {Provider} from 'mobx-react'
import store from '@/store'

import Context from '@/utils/context'

import Layout from '@/views/layout'

class App extends React.Component {
	constructor(props) {
		super(props)
		this.state = {
			theme: {
				color: '#ffffff',
				backgroundColor: '#000000'
			}
		}
	}
	render() {
		const {theme} = this.state
		return (
			<HashRouter>
				<Provider {...store}>
					<Context.Provider value={theme}>
						<div>
							{/* <TodoList /> */}
							{/* <CNode /> */}
							{/* <MyContext theme={theme} onChange = {theme => this.setState({theme})}/> */}
							{/* <TestHoc /> */}
							{/* <TestHooks /> */}
							<Layout />
						</div>
					</Context.Provider>
				</Provider>
			</HashRouter>
		)
	}
}

export default App
